import { EnumTagType, EnumTagLevel, EnumTagState } from "@/api";
import { convertEnumToOptions } from "@/utils/queryConversion";

export const pageColumns = [
  {
    title: "ID",
    dataIndex: "id",
    key: "id",
    sorter: true,
    width: 50,
  },
  {
    title: "标签名称",
    dataIndex: "name",
    key: "name",
    width: 200,
  },
  {
    title: "标签类型",
    dataIndex: "type",
    key: "type",
    width: 100,
  },
  {
    title: "关联词汇",
    dataIndex: "relationWords",
    key: "relationWords",
    width: 150,
  },
  {
    title: "标签等级",
    dataIndex: "level",
    key: "level",
    sorter: true,
    width: 100,
  },
  {
    title: "分值",
    dataIndex: "value",
    key: "value",
    sorter: true,
    width: 80,
  },
  {
    title: "添加方式",
    dataIndex: "addType",
    key: "addType",
    width: 100,
  },
  {
    title: "使用次数",
    dataIndex: "useCount",
    key: "useCount",
    sorter: true,
    width: 100,
  },
  {
    title: "标签状态",
    dataIndex: "state",
    key: "state",
    sorter: true,
    width: 100,
  },
  {
    title: "操作",
    key: "action",
    dataIndex: "action",
    width: 80,
  },
];

export const EnumIsShow = [
  { label: "显示", value: true },
  { label: "隐藏", value: false },
];

export const TagsTypeOption = convertEnumToOptions(EnumTagType);
export const TagsLevelOptions = convertEnumToOptions(EnumTagLevel);
export const TagsStateOptions = convertEnumToOptions(EnumTagState);
